#include<bits/stdc++.h>
using namespace std;
int n,a[100005],l=1;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
	cin>>n;
    int ans=n;
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        if(a[i]>a[l]){
            ans--;
            l++;
        }
    }
    cout<<ans;
}
